
const requireImg = (imgPath) => {
  return new URL(`../assets/images/index/${imgPath}`, import.meta.url).href;
};
import { reactive,computed } from "vue";
import store from "../store";
const languageList = reactive([
  {
    "name": "简体中文",
    src: requireImg('zh.svg'),
    id: 'zh'
  },
  {
    "name": "English",
    src: requireImg('en.svg'),
    id: 'en'
  },
  {
    "name": "แบบไทย",
    src: requireImg('th.svg'),
    id: 'th'
  },
  {
    "name": "Melayu",
    src: requireImg('ma.svg'),
    id: 'bm'
  },
  {
    "name": "Tiếng Việt",
    src: requireImg('vi.png'),
    id: 'vi'
  },
  {
    "name": "한국어",
    src: requireImg('ko.svg'),
    id: 'ko'
  },
  {
    "name": "日本語",
    src: requireImg('ja.svg'),
    id: 'ja'
  },
  {
    "name": "Türkçe",
    src: requireImg('tr.png'),
    id: 'tr'
  },
  {
    "name": "Русский язык",
    src: requireImg('ru.png'),
    id: 'ru'
  },
  {
    "name": "भारत गणराज्य",
    src: requireImg('in.png'),
    id: 'hin'
  },
  {
    "name": "ភាសារខ្មែរ",
    src: requireImg('ca.png'),
    id: 'ca'
  },
  {
    "name": "Español",
    src: requireImg('sp.png'),
    id: 'sp'
  },

])
const languageName = computed( () => {
  let nowItem = languageList.find(res => res.id == store.state.languageStatus)
  return nowItem.name
})
export { languageList, languageName }